# import requests
# from requests import Response
# from pytest_yaml_yoyo import my_builtins
# import hashlib
# from case_hook.x3 import sign_body
#
#
# def response_hook(response: Response, *args, **kwargs):
#     print('url', response.url)
#     print('status_code', response.status_code)
#     response.status_code = 200
#
#
# def hooks_req(req: dict):
#     """ req  是内置的request 对象"""
#     print(f"req: {req}")
#     print(f"获取请求参数：{req.get('params')}")
#     req['params']['name'] = 'yoyo222'
#
#
# def hooks_sign(req: dict):
#     body = req.get('json')
#     print(f"获取到的body: {body}")
#     sign = sign_body(body)
#     print(f"获取到的body: {sign}")
#     # 替换sign
#     req['json']['sign'] = sign
#
#
# my_builtins.response_hook = response_hook
# my_builtins.hooks_req = hooks_req
# my_builtins.hooks_sign = hooks_sign
